package com.learn.service.impl;

import com.learn.dao.AccountDao;
import com.learn.pojo.Account;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author DJJ_F
 * @version 1.0
 * @date 2025/01/20
 * @description
 */
@Service("i2")
public class IsolateService2 {
    @Resource
    private AccountDao accountDao;

    @Transactional(isolation = Isolation.READ_COMMITTED)
    public Account select(Integer id) {
        return accountDao.selectById(id);
    }
}
